package com.song.nowcoder.offer100;

/**
 * @author Song Yinghui
 * @date 2018/9/30
 * @Version 1.0
 */
public class Array {


    public boolean Find(int target, int[][] array) {

       for (int i = 0 ; i < array.length ; i ++){
            for (int j = 0 ; j < array[i].length ; j++){
                if (array[i][j] == target){
                    return true ;
                }
            }
       }
        return false ;
    }

    public static void main(String[] args) {
        int[][] array = {{1,2,8,9},{2,4,9,12},{4,7,10,13},{6,8,11,15}};
        Array array1 = new Array();
        boolean find = array1.Find(7, array);
        System.out.println(find);
    }

}
